<!--设备型号参数库模板-->
<div class="container-fluid">
    <!--查询区域-->
    <div class="row ikg-row">
        <div class="col-sm-12 ikg-col">
            <div class="panel panel-default ikg-panel">
                <div class="panel-body">
                    <div class="col-lg-4">
                        <div class="input-group">
                            <label class="input-group-addon ikg-font-12">设备类型:</label>
                            <select class="form-control select2-container ikg-select" data-bind="options:deviceOpts,
                            optionsText:'code_text',
                            optionsValue:'code_value',
                            value:fixedModelType,
                            optionsCaption:'请选择设备类型'"></select>
                        </div>
                    </div>
                    <div class="col-lg-4">
                        <button type="button" class="btn btn-success btn-sm"
                                data-bind="click:fnSearch">
                            <i class="fa fa-search fa-lg"></i><span class="hidden-xs hidden-sm"> 查询</span></button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--工具栏-->
    <div class="row ikg-row">
        <div class="col-sm-12 ikg-col">
            <div id="toolbar" class="btn-group">
                <button type="button" class="btn btn-success btn-md" data-bind="click:fnAdd">
                    <i class="fa fa-plus fa-lg" aria-hidden="true"></i><span class="hidden-sm hidden-xs"> 新增</span>
                </button>
                <button type="button" class="btn btn-success btn-md" data-bind="click:fnRemove">
                    <i class="fa fa-trash fa-lg" aria-hidden="true"></i><span class="hidden-sm hidden-xs"> 删除</span>
                </button>
                <button type="button" class="btn btn-success btn-md" data-bind="click:fnEdit">
                    <i class="fa fa-pencil-square-o fa-lg" aria-hidden="true"></i><span
                        class="hidden-sm hidden-xs"> 编辑</span>
                </button>
                <button type="button" class="btn btn-success btn-md" data-bind="click:fnView">
                    <i class="fa fa-file-text fa-lg" aria-hidden="true"></i><span class="hidden-sm hidden-xs"> 查看</span>
                </button>
            </div>
        </div>
    </div>
    <!--列表区域-->
    <div class="row ikg-row">
        <div class="col-sm-12 ikg-col table-responsive">
            <table data-bind="tableView:tableViewModel" class="table text-nowrap"></table>
        </div>
    </div>
</div>
<div id="libDetailViewDialog" class="modal hide" tabindex="-1" role="dialog"
     data-bind="template:{name:'libDetailViewTemplate',data:libViewModel},ikgModal:{backdrop:'static',keyboard:false,show:modelVisible}"></div>
<script id="libDetailViewTemplate" type="text/html">
    <div class="modal-dialog" style="width: 400px" role="document">
        <div class="modal-content">
            <div class="modal-header ikg-modal-header" id="modalHeader">
                <button type="button" class="close ikg-close" data-bind="click: close">&times;</button>
                <span class="modal-title ikg-modal-title" data-bind="text:title"></span>
            </div>
            <div class="modal-body">
                <form id="detailForm" class="form-horizontal" autocomplete="off">
                    <div class="form-group">
                        <label for="modelNo" class="col-sm-3 control-label">型号编码:</label>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" name="modelNo" id="modelNo" placeholder="*,必填"
                                   data-bind="value:modelNo">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="resistanceValue" class="col-sm-3 control-label">电阻值(Ω):</label>
                        <div class="col-sm-8">
                            <input type="number" class="form-control" name="resistanceValue" id="resistanceValue"
                                   step="0.01"
                                   data-bind="value:resistanceValue">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="reactanceValue" class="col-sm-3 control-label">电抗值(F):</label>
                        <div class="col-sm-8">
                            <input type="number" class="form-control" name="reactanceValue" id="reactanceValue"
                                   step="0.01"
                                   data-bind="value:reactanceValue">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="powerValue" class="col-sm-3 control-label">功率值(W):</label>
                        <div class="col-sm-8">
                            <input type="number" class="form-control" name="powerValue" id="powerValue" step="0.01"
                                   data-bind="value:powerValue">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="modelType" class="col-sm-3 control-label">设备类型:</label>
                        <div class="col-sm-8">
                            <select class="form-control" name="modelType" id="modelType"
                                    data-bind="options:deviceOpts,optionsText:'code_text',optionsValue:'code_value',value:modelType,optionsCaption:'请选择设备类型'">
                            </select>
                        </div>
                    </div>
                    <div class="hidden">
                        <input data-bind="value:modelId" type="text">
                    </div>
                </form>
            </div>
            <div class="modal-footer" id="modalFooter">
                <button type="button" class="btn btn-primary ikg-btn-12" data-bind="click:save,visible:enabled">
                    <i class="fa fa-save fa-lg"></i> 保存
                </button>
                <button type="button" class="btn btn-default ikg-btn-12" data-bind="click:close">
                    <i class="fa fa-close fa-lg"></i> 关闭
                </button>
            </div>
        </div>
    </div>
</script>